/*
 * Crypto-JS v2.0.0
 * http://code.google.com/p/crypto-js/
 * Copyright (c) 2009, Jeff Mott. All rights reserved.
 * http://code.google.com/p/crypto-js/wiki/License
 */
(function() {
	var c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
	var d = window.Crypto = {};
	var a = d.util = {
		rotl : function(h, g) {
			return (h << g) | (h >>> (32 - g));
		},
		rotr : function(h, g) {
			return (h << (32 - g)) | (h >>> g);
		},
		endian : function(h) {
			if (h.constructor == Number) {
				return a.rotl(h, 8) & 16711935 | a.rotl(h, 24) & 4278255360;
			}
			for ( var g = 0; g < h.length; g++) {
				h[g] = a.endian(h[g]);
			}
			return h;
		},
		randomBytes : function(h) {
			for ( var g = []; h > 0; h--) {
				g.push(Math.floor(Math.random() * 256));
			}
			return g;
		},
		bytesToWords : function(h) {
			for ( var k = [], j = 0, g = 0; j < h.length; j++, g += 8) {
				k[g >>> 5] |= h[j] << (24 - g % 32);
			}
			return k;
		},
		wordsToBytes : function(i) {
			for ( var h = [], g = 0; g < i.length * 32; g += 8) {
				h.push((i[g >>> 5] >>> (24 - g % 32)) & 255);
			}
			return h;
		},
		bytesToHex : function(g) {
			for ( var j = [], h = 0; h < g.length; h++) {
				j.push((g[h] >>> 4).toString(16));
				j.push((g[h] & 15).toString(16));
			}
			return j.join("");
		},
		hexToBytes : function(h) {
			for ( var g = [], i = 0; i < h.length; i += 2) {
				g.push(parseInt(h.substr(i, 2), 16));
			}
			return g;
		},
		bytesToBase64 : function(h) {
			if (typeof btoa == "function") {
				return btoa(e.bytesToString(h));
			}
			for ( var g = [], l = 0; l < h.length; l += 3) {
				var m = (h[l] << 16) | (h[l + 1] << 8) | h[l + 2];
				for ( var k = 0; k < 4; k++) {
					if (l * 8 + k * 6 <= h.length * 8) {
						g.push(c.charAt((m >>> 6 * (3 - k)) & 63));
					} else {
						g.push("=");
					}
				}
			}
			return g.join("");
		},
		base64ToBytes : function(h) {
			if (typeof atob == "function") {
				return e.stringToBytes(atob(h));
			}
			h = h.replace(/[^A-Z0-9+\/]/ig, "");
			for ( var g = [], j = 0, k = 0; j < h.length; k = ++j % 4) {
				if (k == 0) {
					continue;
				}
				g
						.push(((c.indexOf(h.charAt(j - 1)) & (Math.pow(2, -2
								* k + 8) - 1)) << (k * 2))
								| (c.indexOf(h.charAt(j)) >>> (6 - k * 2)));
			}
			return g;
		}
	};
	d.mode = {};
	var b = d.charenc = {};
	var f = b.UTF8 = {
		stringToBytes : function(g) {
			return e.stringToBytes(unescape(encodeURIComponent(g)));
		},
		bytesToString : function(g) {
			return decodeURIComponent(escape(e.bytesToString(g)));
		}
	};
	var e = b.Binary = {
		stringToBytes : function(j) {
			for ( var g = [], h = 0; h < j.length; h++) {
				g.push(j.charCodeAt(h));
			}
			return g;
		},
		bytesToString : function(g) {
			for ( var j = [], h = 0; h < g.length; h++) {
				j.push(String.fromCharCode(g[h]));
			}
			return j.join("");
		}
	};
})();
(function() {
	var f = Crypto, a = f.util, b = f.charenc, e = b.UTF8, d = b.Binary;
	var c = f.SHA1 = function(i, g) {
		var h = a.wordsToBytes(c._sha1(i));
		return g && g.asBytes ? h : g && g.asString ? d.bytesToString(h) : a
				.bytesToHex(h);
	};
	c._sha1 = function(o) {
		if (o.constructor == String) {
			o = e.stringToBytes(o);
		}
		var v = a.bytesToWords(o), x = o.length * 8, p = [], r = 1732584193, q = -271733879, k = -1732584194, h = 271733878, g = -1009589776;
		v[x >> 5] |= 128 << (24 - x % 32);
		v[((x + 64 >>> 9) << 4) + 15] = x;
		for ( var z = 0; z < v.length; z += 16) {
			var E = r, D = q, C = k, B = h, A = g;
			for ( var y = 0; y < 80; y++) {
				if (y < 16) {
					p[y] = v[z + y];
				} else {
					var u = p[y - 3] ^ p[y - 8] ^ p[y - 14] ^ p[y - 16];
					p[y] = (u << 1) | (u >>> 31);
				}
				var s = ((r << 5) | (r >>> 27))
						+ g
						+ (p[y] >>> 0)
						+ (y < 20 ? (q & k | ~q & h) + 1518500249 : y < 40 ? (q
								^ k ^ h) + 1859775393
								: y < 60 ? (q & k | q & h | k & h) - 1894007588
										: (q ^ k ^ h) - 899497514);
				g = h;
				h = k;
				k = (q << 30) | (q >>> 2);
				q = r;
				r = s;
			}
			r += E;
			q += D;
			k += C;
			h += B;
			g += A;
		}
		return [ r, q, k, h, g ];
	};
	c._blocksize = 16;
})();